import Vue from './common/bootstrap.js'
import App from './page/square.vue'
import VueRouter from 'vue-router'
import VueClipboard from 'vue-clipboard2'
import Vuex from 'vuex'

Vue.use(VueClipboard)
Vue.use(Vuex)
Vue.use(VueRouter);

import Index from './square/page/index.vue'
import Search from './square/page/search.vue'
import Create from './square/page/create.vue'
import Detail from './square/page/detail.vue'
import Report from './square/page/report.vue'

import store from './square/store'
const routes = [
    { path: '/', name: 'home', component: Index },
    { path: '/search', name: 'search', component: Search },
    { path: '/create', name: 'create', component: Create },
    { path: '/detail', name: 'detail', component: Detail },
    { path: '/report', name: 'report', component: Report },
]


const router = new VueRouter({
    routes // (缩写) 相当于 routes: routes
})

new Vue({
    router,
    store: new Vuex.Store(store),
    render: h => h(App)
}).$mount('#app')